Ext.namespace("Project.Main");//PactManagement.js

Project.Main = function(){
	
	var flag="";
		 //访问action
	 var conn = new Ext.data.Connection({
	    url:'../security/checkMenu.form?timesnap=' + Date.parse(new Date()),
	    method:'post'
	 })
	 var param={menuName:"rb"};
	  //alert(Ext.util.JSON.encode(param));  
	 Utils.request(conn,{
	    params:param,
	    scope:this,
	    success:function(data){
	     if(data.access=="true"){
	     flag="true"
			var mainPanel = new Ext.TabPanel( {
				activeTab : 0,
				width : 950,
				border : false,
				renderTo : 'main',
				items : [ {
					title : '撰写日报',
					autoHeight : true,
					items : [ new CreatePact().createPanel ]
				}
				,
				{
					title : '日报评审',
					autoHeight : true,
					items : [ new Report().reportPanel ]
				}
				]
			});
	
 }else{
	      flag="false"
	      alert("没有权限");
	      return;
	     }
	
	    }
	  });	
	
	
	
};
	
	Ext.onReady(function(){
		 Ext.QuickTips.init();
		 Ext.form.Field.prototype.msgTarget = 'side';
		 Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
		 new Project.Main();
	});